<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <ul class="list one">
        <li id="first">01</li>
        <li class="mid">02</li>
        <li class="mid">03</li>
        <li class="mid">04</li>
        <li class="mid">05</li>
        <li name="last">06</li>
    </ul>
    <ul class="list two">
        <li>01</li>
        <li>02</li>
        <li>03</li>
        <li>04</li>
        <li>05</li>
        <li>06</li>
    </ul>
</body>
<script>
    //  传入一个css选择器 => 获取对应的元素
    // document.querySelector()      单元素获取(如果获取的元素有多个默认返回第一个 获取不到 => null)
    // document.querySelectorAll()   多元素获取=>将获取的元素放到数组中  获取不到 => []

    // var one = document.querySelector(".one");
    // console.log(one);

    // var first = document.querySelector("#first");
    // console.log(first);

    // var mid = document.querySelector(".mid");
    // console.log(mid);


    var one = document.querySelectorAll(".one");
    console.log(one);

    var first = document.querySelectorAll("#first");
    console.log(first);

    var mid = document.querySelectorAll(".mid");
    console.log(mid);


</script>

</html>